<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    {load href="/static/js/layer/skin/default/layer.css" /}
    <style>
        tr,th{
            text-align: center;
        }
        th{
            color: #797979;
        }
        #keyword{
            width: 300px;
        }
        .breadcrumb{
            background-color: #515151;
        }
        .breadcrumb span{
            color: #ffffff;
        }
        .ml15{
            margin-left: 15px;
        }
        .c2{
            cursor: pointer;
            text-align: center;
            display: inline-block;
            width: 100px;
            height: 35px;
            line-height: 15px;
            margin-right: 10px;
        }
        .mytab{
            font-size:15px;
            border-bottom: 1px solid #C8C8C8;
            margin-bottom: 20px;
        }

        .mytab .active{
            border-bottom: 4px solid #505050;
            color: #ff5800;
        }
    </style>
</head>
<body>
<div style="padding-left: 20px;padding-right: 20px;">

    <ol class="breadcrumb">
        <li><span href="#">当前位置</span></li>
        <li><span href="#">系统设置</span></li>
        <li class="active"><span>配置公众号</span></li>
    </ol>
    <div class="container-fluid">
        <div class="mytab">
            <span class="c2" onclick="window.location.href='{:url('Card/mycard')}'">会员卡列表</span>
            <span class="c2" onclick="window.location.href='{:url('Card/memberlist')}'">会员信息</span>
            <span class="c2" onclick="window.location.href='{:url('Card/memberopereate')}'">会员运营</span>
            <span class="c2" onclick="window.location.href='{:url('Card/memberdata')}'">会员数据</span>
            <span class="c2" onclick="window.location.href='{:url('Card/addcard')}'">新建会员卡</span>
            <span class="c2 active">配置公众号</span>
        </div>
        <form class="row" method="post" enctype="multipart/form-data">
            {:token()}
            <div class="form-group col-xs-12">
                <label for="appid" class="col-xs-2 control-label">APPID</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control" id="appid" name="appid" placeholder="绑定支付的APPID（必须配置，开户邮件中可查看）" value="{if condition='isset($res)'}{$res.appid}{/if}">
                </div>
            </div>
            <div class="form-group col-xs-12">
                <label for="secret" class="col-xs-2 control-label">SECRET</label>
                <div class="col-xs-10">
                    <input type="password" class="form-control" id="secret" name="secret" value="{if condition='isset($res)'}{$res.secret}{/if}" placeholder="公众帐号secert,获取地址：https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev&token=2005451881&lang=zh_CN">
                </div>
            </div>
            <div class="form-group col-xs-12">
                <label for="token" class="col-xs-2 control-label">TOKEN</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control" id="token" name="token" value="{if condition='isset($res)'}{$res.token}{/if}" placeholder="用来配置微信服务器地址的随意字符串">
                </div>
            </div>
            <div class="form-group col-xs-12">
                <label for="key" class="col-xs-2 control-label">KEY</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control" id="key" name="key" value="{if condition='isset($res)'}{$res.key}{/if}" placeholder="商户支付密钥，参考开户邮件设置（必须配置，登录商户平台自行设置）">
                </div>
            </div>
            <div class="form-group col-xs-12">
                <label for="mchid" class="col-xs-2 control-label">mchid</label>
                <div class="col-xs-10">
                    <input type="text" class="form-control" id="mchid" name="mchid" value="{if condition='isset($res)'}{$res.mchid}{/if}" placeholder="商户号（必须配置，开户邮件中可查看）">
                </div>
            </div>
            <div class="form-group col-xs-12">
                <label class="col-xs-2 control-label">SSLCERT</label>
                <div class="col-xs-8">
                    <input type="text" class="form-control" value="{if condition='isset($res["sslcert_path"])'}已上传{/if}" disabled name="sslcert_path" placeholder="API证书下载地址：https://pay.weixin.qq.com/index.php/account/api_cert，下载之前需要安装商户操作证书）">
                </div>
                <label class="col-xs-2" for="sslcert_path">
                    <div class="btn btn-success" type="button">上传</div>
                    <input type="file" class="" id="sslcert_path" name="sslcert_path"  style="width: 0;height: 0;display: inline;">
                </label>
            </div>
            <div class="form-group col-xs-12">
                <label for="sslkey_path" class="col-xs-2 control-label">SSLKEY</label>
                <div class="col-xs-8">
                    <input type="text" class="form-control" value="{if condition='isset($res["sslkey_path"])'}已上传{/if}" disabled name="sslkey_path" placeholder="API证书下载地址：https://pay.weixin.qq.com/index.php/account/api_cert，下载之前需要安装商户操作证书）">
                </div>
                <label class="col-xs-2" for="sslkey_path">
                    <div class="btn btn-success" type="button">上传</div>
                    <input type="file" class="" id="sslkey_path" name="sslkey_path"  style="width: 0;height: 0;display: inline;">
                </label>
            </div>
            <div class="col-xs-10 col-xs-offset-2" style="text-decoration: underline;color: #00a1ee;cursor: pointer;" onclick="window.open('https://mp.weixin.qq.com/advanced/advanced')">或前往微信公众平台</div>
            <div class="col-xs-12 text-center" style="margin-top:50px;">
                <button class="btn btn-success" type="submit" style="margin-right: 30px;">保存</button>
                <button class="btn btn-warning" type="reset">重置</button>
            </div>
        </form>
    </div>
</div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
{load href="/static/js/layer/layer.js" /}
<script>
    $("input[type=file]").on("change",function () {
        $(this).parent("label").prev("div").find("input[type=text]").val(this.value);
    })

</script>
</body>
</html>